{include file="public/header" /}
<link rel="stylesheet" href="/static/admin/addons/builder/css/base.css" media="all" xmlns:>
{include file="product/cope/css" /}
<body>
<form action="{:url('save')}" class="layui-form" id="form" lay-filter='form'>
    {include file="public/referrer" /}
    {include file="public/arguments" /}
    <input type="hidden" name="id" value="{$info?$info.id:''}" />
    <div class="layui-fluid layui-anim layui-anim-downbit">
        <div class="layui-card">
            <div class="layui-card-body" style="padding: 15px;">
                <div class="layui-tab layui-tab-brief" lay-filter="brief">
                    <ul class="layui-tab-title">
                        <li class="layui-this">商品信息</li>
                        <li>商品设置</li>
                        <li>商品图片</li>
                        <li>商品详情</li>
                    </ul>
                    <div class="layui-tab-content">
                        <div class="layui-tab-item layui-show">
                            <div class="layui-form-item">
                                <label class="layui-form-label req">商品名称</label>
                                <div class="layui-input-block">
                                    <input type="text" name="title" lay-verify="required" lay-reqtext="请输入商品名称"
                                           placeholder="请输入商品名称" value="{$info?$info.title:''}" class="layui-input" />
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">商品描述</label>
                                <div class="layui-input-block">
                                    <input type="text" name="describe" lay-verify="required" lay-reqtext="请输入商品描述"
                                           placeholder="请输入商品描述" value="{$info?$info.describe:''}" class="layui-input" />
                                </div>
                            </div>
                            <!-- 引入分类  -->
                            {include file="product/cope/cate" /}
                            <!-- 引入分类End -->
                            <div class="layui-form-item">
                                <label class="layui-form-label">销量</label>
                                <div class="layui-input-inline">
                                    <input type="number" name="sales" placeholder="请输入销量"
                                           value="{$info?$info.sales:'0'}" class="layui-input" />
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">排序</label>
                                <div class="layui-input-inline">
                                    <input type="number" name="sort" placeholder="请输入排序"
                                           value="{$info?$info.sort:'0'}" class="layui-input" />
                                </div>
                            </div>
                        </div>

                        <div class="layui-tab-item">
                            {include file="product/cope/spec" /}
                        </div>

                        <div class="layui-tab-item">
                            <div class="layui-form-item">
                                <label class="layui-form-label req">商品图片</label>
                                <?php $data = isset($info)?$info:[];?>
                                {table:alone view='items/img' info='$data' form='["field" => "images", "value" => 10]'/}
                                <div class="layui-form-mid layui-text-em layui-text-em2">
                                    建议尺寸：800*800，默认首张图为主图，最多上传10张，拖动图片可排序
                                </div>
                            </div>
                        </div>

                        <div class="layui-tab-item">
                            <div class="layui-form-item">
                                <label class="layui-form-label req">详情</label>
                                <div class="layui-input-block">
                                    {table:alone view='items/editor' info='$data' form='["field" => "content"]'/}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div style="clear: both;height: 200px;"></div>
    <div class="layui-footer" style="left: 0;">
        <a class="layui-btn" data-back-url="{$backUrl}" lay-filter="saveProduct" lay-submit>保存</a>
    </div>
</form>
</body>
{include file="public/footer" /}
<script type="text/javascript" src="/static/admin/js/jquery-ui.js"></script>
{include file="product/cope/js" /}
</html>